<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript">
        <meta name="description" content="Test on HTML and CSS">
        <meta name="author" content="Huoty">
        <meta http-equiv="refresh" content="30">
        <title>Web 设计</title>
        <link rel="shortcut icon" href="http://konghy.cn/favicon.ico" type="image/x-icon" />
    </head>
    <body>

    </body>
</html> 
<script type="text/javascript">
window.blog = {baseUrl: ""}

blog.addLoadEvent = function(func) {
  var oldonload = window.onload
  if (typeof window.onload != 'function') {
    window.onload = func
  } else {
    window.onload = function() {
      oldonload()
      func()
    }
  }
}

/**
 * 工具，兼容的方式添加事件
 * @param {单个DOM节点} dom
 * @param {事件名} eventName
 * @param {事件方法} func
 * @param {是否捕获} useCapture
 */
blog.addEvent = function(dom, eventName, func, useCapture) {
  if (window.attachEvent) {
    dom.attachEvent('on' + eventName, func)
  } else if (window.addEventListener) {
    if (useCapture != undefined && useCapture === true) {
      dom.addEventListener(eventName, func, true)
    } else {
      dom.addEventListener(eventName, func, false)
    }
  }
}

blog.addLoadEvent(function () {
    alert("hello world!")
})
</script>
